<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8">
		<title>Document</title>
	</head>
	<body>
		
	</body>
</html>
<script>
	// 通过字面量创建对象
	var person = {
		name: "小花",
		age: 22,
		gender: "女",
		sing: function() {
			console.log("我会唱歌");
		}
	};

	// for...in遍历
	for (var key in person) {
		console.log(key);
		console.log(person[key]);
	}

	// 判断person中有没有name属性
	if ("name" in person) {
		console.log("有");
	}

	// 删除person的属性
	delete person.name;
	console.log(person);



</script>